/** 文章相关 **/

import request from "../request";

let timeApi = 'timeserviceapi';


/**
 * 获取所有文章数据
 * @returns {AxiosPromise}
 */
export function selectList(params) {
    return request({
        method: "get",
        url: timeApi+"/article/selectList",
        params:params
    });
};
/**
 * 获取所有文章数据
 * @returns {AxiosPromise}
 */
export function getArticleByUserName(params) {
    return request({
        method: "get",
        url: timeApi+"/article/getArticleByUserName",
        params:params
    });
};

/**
 * 获取文章数据
 * @returns {AxiosPromise}
 */
export function findByarticleId(params) {
    return request({
        method: "get",
        url: timeApi+"/article/comment/findByarticleId",
        params:params
    });
};
/**
 * 获取文章数据
 * @returns {AxiosPromise}
 */
export function thumbsUp(params) {
    return request({
        method: "get",
        url: timeApi+"/article/thumbsUp/",
        params:params
    });
};
/**
 * 断开websocket连接
 * @returns {AxiosPromise}
 */
export function articleLogOut(params) {
    return request({
        method: "get",
        url: timeApi+"/login/logout",
        params:params
    });
};
/**
 * 新增文章
 * @returns {AxiosPromise}
 */
export function insertArticle(data) {
    return request({
        method: "post",
        url: timeApi+"/article/insertArticle",
        data
    });
};





/**
 * 新增文章
 * @returns {AxiosPromise}
 */
export function insertComment(data) {
    return request({
        method: "post",
        url: timeApi+"/article/comment/insertComment",
        data
    });
};



/**
 * 获取文章数据
 * @returns {AxiosPromise}
 */
export function getNotice(params) {
    return request({
        method: "get",
        url: timeApi+"/article/notice/getNotice",
        params:params
    });
};

/**
 * 获取文章数据
 * @returns {AxiosPromise}
 */
export function follow(params) {
    return request({
        method: "get",
        url: timeApi+"/article/follow",
        params:params
    });
};
/**
 * 获取文章数据
 * @returns {AxiosPromise}
 */
export function delArticle(params) {
    return request({
        method: "get",
        url: timeApi+"/article/delArticle",
        params:params
    });
};